package com.aix.demo.activity;

import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.Spinner;

import com.aix.android.framework.activity.BaseActivity;
import com.aix.demo.R;

public class SpinnerActivity extends BaseActivity {
	
	private Spinner spinner;
	
	private Spinner spinner1;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		setContentView(R.layout.activity_spinner);
		
		spinner = (Spinner) findViewById(R.id.spinner);
		spinner1 = (Spinner) findViewById(R.id.spinner1);
		
		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.simple_spinner_item, R.id.textview);
		adapter.add("q");
		adapter.add("w");
		adapter.add("e");
		
		adapter.setDropDownViewResource(R.layout.simple_spinner_dropdown_item);
		
		spinner.setAdapter(adapter);
		spinner1.setAdapter(adapter);
	}
}
